<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		
		#box{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
		}

	</style>
	<script>
		window.onload= function () {
			
			box = document.getElementById('box');

			box.onclick = function () {

				box.style.background ="blue";
			}

			box.onmouseover= function () {
				box.style.background ="green";
			}

			box.onmouseout = function () {
				box.style.background ="red";
			}

			btn = document.getElementById('btn');

			btn.onclick = function () {

				box.style.width = "400px";
			}

			input = document.getElementById('input')

			input.onfocus = function () {
				input.style.width= '300px';
			}

			input.onblur = function () {
				input.style.width= '150px';
			}

			// onclick  onmouseout  onmouseover onfocus onblur 



		}
	</script>
</head>
<body>
	<div id="box">
		
	</div>

	<input type="button" id="btn" value="点我" >
	<input type="text" id="input">
</body>
</html>